@extends("h5.layouts.main")
@section('content')
<?php

use App\Jobs\Fun;
use App\admin\Service\OA;
use App\Models\MoneyBilModel;

$uid = OA::$user->getId();
$listModel = MoneyBilModel::whereRaw(
        'uid = ? AND (  (type = ? AND status = ? ) OR type =?  OR type = ? OR type = ?  )',[
            $uid, MoneyBilModel::type_chongzhi, 
            MoneyBilModel::status_Success,
            MoneyBilModel::type_zhuanru,
            MoneyBilModel::type_tixian, MoneyBilModel::type_zhuanchu,
        ] )->orderBy('id', 'DESC')->limit(100)->get(); //->toArray();
$list = [];
if ($listModel) {
    $list = $listModel->toArray();
}
?>
<div class="divbodyH5 moneyDiv">
    <div id="settingTitle">
        <b>记录</b>
        <a class="back" onclick="MC.back()"> <img src="/h5/images/return.png" id="settingRtn"></a>
    </div>

    <div class="myTable"> 


        <div class="infoDiv">

            <ul class="ul">
                <?php foreach ($list as $vo) { ?>
                    <li class="li">
                        <a href="/h5/my/money/info?out_trade_no=<?= $vo['out_trade_no'] ?>" class="a">
                            <div class="pli">
                                <span class="label"><?= MoneyBilModel::getType($vo['type']) ?>:</span>
                                <span class="value">¥<?= $vo['money'] ?>元</span> 
                                <span class="time"><?= Fun::date($vo['time']) ?></span>
                            </div>
                            <?php  ?>
                            <div class="pli">
                                <span class="status">状态:<?= MoneyBilModel::getstatus($vo['status']) ?></span>
                            </div>
                             <?php ?>
                        </a>
                    </li>
                <?php } ?>       

            </ul> 

        </div> 

    </div>



</div>
<script>
    //  new MC.Money.jilu();

</script>

@stop